<template>
  <div class="network">
    <div class="network-container">
      <div class="network-box">
        <div class="tit-line">
          <span class="tit-line1"></span>
          <span class="tit-line2"></span>
        </div>
        <h2 class="solve-tit">{{$t('contentDetails.serviceContent')}}</h2>
      </div>

      <div class="service-grid">
        <div
          v-for="(item, index) in serviceContentList"
          :key="index"
          class="service-item-grid"
        >
          <div class="service-image">
            <img
              :src="baseUrl+item.itemIcon"
              :alt="item.title"
              loading="lazy"
            />
          </div>
          <div class="service-text">
            <h3 class="service-grid-title">{{ item.title }}</h3>
            <p class="service-grid-desc">{{ item.content }}</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script >
export default {
  props: {
    serviceContentList: {
      type: Array,
      default: () => []
    }
  },
  computed: {
    baseUrl() {
      return process.env.VUE_APP_BASE_API
    }
  },
  methods: {

  }
}
</script>



<style scoped lang="scss">
/* 基础样式保持不变 */
.network {
  background: url('~@/assets/asl_images/project_back.webp') no-repeat top center;
  background-size: 70% 110%;
  padding: 80px 0;
}

.network-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.network-box {
  text-align: left;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.service-item-grid {
  display: flex;
  align-items: center;
  overflow: hidden;
}

.service-image img {
  width: 100%;
  object-fit: cover;
}

.service-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 30px;
}

h3, p {
  padding: 0 !important;
}

.service-grid-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

.service-grid-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

.tit-line {
  display: flex;
  justify-content: left;
  margin-bottom: 20px;
}

.tit-line1, .tit-line2 {
  height: 8px;
  background: #fe3231;
  border-radius: 10px;
}

.tit-line1 {
  width: 60px;
}

.tit-line2 {
  width: 10px;
  margin-left: 10px;
}

.solve-tit {
  font-size: 30px;
  font-weight: bold;
  color: #333;
  margin-bottom: 15px;
  text-align: left;
}

.service-title {
  font-size: 18px;
  font-weight: 550;
  color: #333;
  margin-bottom: 5px;
  transition: color 0.3s;
}

/* ========== 移动端适配样式 ========== */
@media (max-width: 992px) {
  .network {
    padding: 60px 0;
    background-size: 90% 100%; /* 调整背景大小 */
  }

  .service-grid {
    gap: 30px; /* 减小间距 */
  }

  .service-text {
    padding-left: 20px; /* 减小左边距 */
  }

  .service-grid-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .service-grid-desc {
    font-size: 15px;
  }

  .solve-tit {
    font-size: 26px;
  }
}

@media (max-width: 768px) {
  .network {
    padding: 40px 0;
    background-size: 100% auto; /* 适应移动端宽度 */
    background-position: top center; /* 确保背景居中 */
  }

  .network-container {
    padding: 0 15px;
  }

  .service-grid {
    grid-template-columns: 1fr; /* 改为单列布局 */
    gap: 30px;
    margin-top: 10px;
  }

  .service-item-grid {
    flex-direction: column; /* 垂直排列 */
    text-align: center; /* 内容居中 */
    padding: 20px;
    background: rgba(255,255,255,0.85); /* 增加白色背景提升可读性 */
  }

  .service-image {
    margin-bottom: 20px;
  }

  .service-text {
    padding-left: 0; /* 移除左边距 */
  }

  .service-grid-title {
    font-size: 20px; /* 稍微增大标题字体大小 */
    margin-bottom: 10px;
  }

  .service-grid-desc {
    font-size: 15px;
    line-height: 1.7;
  }

  .solve-tit {
    font-size: 24px;
  }

  .tit-line {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .network {
    padding: 30px 0;
  }

  .service-grid {
    gap: 20px;
    margin-top: 5px;
  }

  .service-item-grid {
    padding: 15px;
  }

  .service-grid-title {
    font-size: 18px;
  }

  .service-grid-desc {
    font-size: 14px;
    line-height: 1.6;
  }

  .solve-tit {
    font-size: 22px;
    margin-bottom: 12px;
  }

  .tit-line1 {
    width: 50px;
  }

  .tit-line2 {
    width: 8px;
    margin-left: 8px;
  }
}
</style>
